import 'dart:io';
main(List<String> args) {
  print("start main");
  getNetworkData().then((value) => print(value)).catchError((error){
    print(error);
  });
  print("end main");
}

Future getNetworkData(){
  return Future((){
    sleep(Duration(seconds: 3));
    // return "hello world";
    throw Exception("请求错误");
  }) ;
}